package com.compass.framework.model

/**
 * Description： 住院记录
 * Date:2024/1/30 14:24
 */
data class HospitalizedLogWarp(
    val list: MutableList<HospitalizedLog>,
    val total: Int,
)

/**
 * {
 * "createTime": 1706540860000, //创建时间
 * "diagnosisName": "桡骨内固定术", //诊断
 * "departmentName": "足踝及手显微外科病区", //科室
 * "inpatientWardName": "整形医院二病区", //病区-头部那个
 * "patientAvatar": "https://baixiaolu.oss-cn-qihuang.aliyuncs.com/common/head1.png", //就诊人头像
 * "patientName": "赵小齐", //就诊人姓名
 * "patientSex": "1", //就诊人性别 1-男 2-女 0-未知
 * "patientBirthday": -1104537600000,
 * "patientAge": 89 //就诊人年龄-快照
 * }
 */
data class HospitalizedLog(
    val id: String,
    val createTime: Long,
    val diagnosisName: String,
    val departmentName: String,
    val inpatientWardName: String,
    val patientAvatar: String,
    val patientName: String,
    val patientSex: Int,
    val patientAge: String,
    val idNumber: String,
    val mobile: String,
    val hisCode: String,
    val doctorName: String,
    val addrDetail: String?,

    val remark: String,
    val conditionText: String,
    val advancePrice: Long,

    ) {
    fun getSexString(): String {
        return when (patientSex) {
            1 -> {
                "男"
            }

            2 -> {
                "女"
            }

            else -> {
                "未知"
            }
        }
    }


    fun getRemarkString(): String {
        if (remark.isEmpty()) {
            return "暂无"
        }

        return remark
    }
    fun getAddressString(): String {
        if (addrDetail.isNullOrEmpty()) {
            return "暂无"
        }

        return addrDetail
    }
}